<?php
include __DIR__."/../config.php";

class Connect
{
	function connect_db()
	{
		try
		{
			$obj = new PDO("mysql:host=".HOST.";dbname=".DBNAME, USER, PASSWORD, array(PDO::MYSQL_ATTR_INIT_COMMAND     => 'SET NAMES \'UTF8\'')); 
			return $obj;
		}
		catch(PDOException $e)
		{
			echo "Error: ".$e -> getMessage();
		}
	}
}
?>
